package com.scnu.yxp.travelapp.homepage;

import com.scnu.yxp.travelapp.R;

import android.app.Activity;
import android.app.ExpandableListActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.widget.ExpandableListView;
import android.widget.ImageView;
import android.widget.ListView;

public class HobbyActivity extends Activity {
	//按钮
	private ImageView backBtn, label, searchBtn;
	//常量
	private final String LANDSCAPE = "location", FOOD = "food", LIFE = "life";
	//listview
	private ListView listView;
	private ExpandableListView eListView;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.activity_hobby);
		Intent intent = getIntent();
		String item = intent.getStringExtra("item");
		backBtn = (ImageView)findViewById(R.id.back_btn);
		label = (ImageView)findViewById(R.id.label);
		searchBtn = (ImageView)findViewById(R.id.search_btn);
		listView = (ListView)findViewById(R.id.listView);
		eListView = (ExpandableListView)findViewById(R.id.expandableListView);
		//更新主题
		switch (item)
		{
			case LANDSCAPE:
				label.setImageResource(R.drawable.hobby_landscape_label);
				break;
			case FOOD:
				label.setImageResource(R.drawable.hobby_food_label);
				break;
			case LIFE:
				label.setImageResource(R.drawable.hobby_life_label);
				break;
			default:
				break;
		}
		//设置监听
		backBtn.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View arg0) {
				finish();
			}
		});
		searchBtn.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View arg0) {
				
			}
		});
	}
}
